<?php
class NewCultivateLandVo extends SzAbstractMySqlVo
{

    private $userId;
    private $landId;
    private $unlock_res;
    private $flowerId;
    private $harvestTime;
    private $videoTime;

    /**
     * Initialize NewCultivateLandVo.
     *
     * @param $userId
     * @param $landId
     * @param $unlock_res
     * @param $flowerId
     * @param $harvestTime
     * @param $videoTime
     * @param boolean $isInsert default false, means for now this vo is initialized not for insert process
     * @return NewCultivateLandVo
     */
    public function __construct($userId, $landId, $unlock_res, $flowerId, $harvestTime, $videoTime = 0, $isInsert = false) {
        $this->userId = $userId;
        $this->landId = $landId;
        $this->unlock_res = $unlock_res;
        $this->flowerId = $flowerId;
        $this->harvestTime = $harvestTime;
        $this->videoTime = $videoTime;

        $this->isInsert = $isInsert;
        $this->voClassName = 'NewCultivateLandVo';
        $this->ormName = 'NewCultivateLand';
    }

    /**
     * @see SzAbstractVo::toArray
     */
    public function toArray($needEncode = false)
    {
        return array(
            'userId' => $this->getUserId(),
            'landId' => $this->getLandId(),
            'unlock_res' => $this->getUnlock_res(),
            'flowerId' => $this->getFlowerId(),
            'harvestTime' => $this->getHarvestTime(),
            'videoTime' => $this->getVideoTime(),
        );
    }

    /**
     * @see SzAbstractVo::toEntireArray
     */
    public function toEntireArray($needEncode = false)
    {
        return array(
            'userId' => $this->getUserId(),
            'landId' => $this->getLandId(),
            'unlock_res' => $this->getUnlock_res(),
            'flowerId' => $this->getFlowerId(),
            'harvestTime' => $this->getHarvestTime(),
            'videoTime' => $this->getVideoTime(),
        );
    }

    /**
     * @see SzAbstractVo::toPureArray
     */
    public function toPureArray()
    {
        return array(
            $this->getUserId(),
            $this->getLandId(),
            $this->getUnlock_res(),
            $this->getFlowerId(),
            $this->getHarvestTime(),
            $this->getVideoTime(),
        );
    }

    public function getUserId()
    {
        return $this->userId;
    }

    public function setUserId($val)
    {
        $this->saveColumnStatus(0, $this->userId);
        $this->userId = $val;
    }

    public function getLandId()
    {
        return $this->landId;
    }

    public function setLandId($val)
    {
        $this->saveColumnStatus(1, $this->landId);
        $this->landId = $val;
    }

    public function getUnlock_res()
    {
        return $this->unlock_res;
    }

    public function setUnlock_res($val)
    {
        $this->saveColumnStatus(2, $this->unlock_res);
        $this->unlock_res = $val;
    }

    public function getFlowerId()
    {
        return $this->flowerId;
    }

    public function setFlowerId($val)
    {
        $this->saveColumnStatus(3, $this->flowerId);
        $this->flowerId = $val;
    }

    public function getHarvestTime()
    {
        return $this->harvestTime;
    }

    public function setHarvestTime($val)
    {
        $this->saveColumnStatus(4, $this->harvestTime);
        $this->harvestTime = $val;
    }

    public function getVideoTime()
    {
        return $this->videoTime;
    }

    public function setVideoTime($val)
    {
        $this->saveColumnStatus(5, $this->videoTime);
        $this->videoTime = $val;
    }

    public function updateHarvestTime($val)
    {
        $this->saveColumnStatus(4, $this->harvestTime);
        $this->harvestTime -= $val;
    }

}